<!--
 * @Description: 
 * @Autor: fage
 * @Date: 2022-06-06 13:52:37
 * @LastEditors: fage
 * @LastEditTime: 2022-10-10 14:27:19
-->
<!DOCTYPE html>
<html>

<head>
    <title>站点管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="../element-ui/index.css" />
</head>

<body>
    <div id="app">
        <div>
            <el-card class="box-card" v-for="item in list">
                <div slot="header" class="clearfix">
                    <span>{{item.id}}</span>
                    <el-button style="float: right; padding: 3px 0" type="text" @click="del(item.id)"
                        icon="el-icon-delete">删除</el-button>
                </div>
                <el-form size="mini" status-icon label-width="100px" class="login-box">
                    <el-form-item label="回调词语" prop="password">
                        <el-input type="text" v-model="item.password" autocomplete="off"></el-input>
                    </el-form-item>                    
                    <el-form-item label="等待执行完毕" prop="waitExecComplete">
                        <el-switch v-model="item.waitExecComplete" active-color="#13ce66" inactive-color="#ff4949">
                        </el-switch>
                    </el-form-item>                    
                    <el-form-item label="网站目录" prop="path">
                        <el-input type="text" v-model="item.path" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="触发词语1" prop="deployKeyword">
                        <el-input type="text" v-model="item.deployKeyword" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="执行命令1" prop="exec">
                        <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 20}" placeholder="请输入内容"
                            v-model="item.exec">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="触发词语2" prop="deployKeyword2">
                        <el-input type="text" v-model="item.deployKeyword2" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="执行命令2" prop="exec2">
                        <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 20}" placeholder="请输入内容"
                            v-model="item.exec2">
                        </el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button :loading="item.loading" :disabled="item.loading" type="primary"
                            @click="submitForm(item.id)" icon="el-icon-check">保存</el-button>
                    </el-form-item>
                </el-form>
            </el-card>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>新建</span>
                </div>
                <el-form size="mini" :model="newItem" status-icon label-width="100px" class="login-box">
                    <el-form-item label="回调词语" prop="password">
                        <el-input type="text" v-model="newItem.password" autocomplete="off"></el-input>
                    </el-form-item>                    
                    <el-form-item label="等待执行完毕" prop="waitExecComplete">
                        <el-switch v-model="newItem.waitExecComplete" active-color="#13ce66" inactive-color="#ff4949">
                        </el-switch>
                    </el-form-item>                    
                    <!-- <el-form-item label="网站目录" prop="path">
                        <el-tree :props="props" :load="loadNode" lazy>
                        </el-tree>
                    </el-form-item> -->
                    <el-form-item label="网站目录" prop="path">
                        <el-input type="text" v-model="newItem.path" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="触发词语1" prop="deployKeyword">
                        <el-input type="text" v-model="newItem.deployKeyword" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="执行命令1" prop="exec">
                        <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 20}" placeholder="请输入内容"
                            v-model="newItem.exec">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="触发词语2" prop="deployKeyword2">
                        <el-input type="text" v-model="newItem.deployKeyword2" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="执行命令2" prop="exec2">
                        <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 20}" placeholder="请输入内容"
                            v-model="newItem.exec2">
                        </el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button :loading="newItem.loading" :disabled="newItem.loading" type="primary"
                            @click="submitForm('newItem')" icon="el-icon-plus">新建</el-button>
                    </el-form-item>
                </el-form>
            </el-card>
        </div>
    </div>

    <script src="../js/vue.min-2.4.js"></script>
    <script src="../element-ui/index.js"></script>
    <script src="../js/util.js"></script>
    <script src="js/index.js"></script>
</body>

</html>